home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 23 / AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso / Tools / Text-Viewer / MSWordView / notes / summaryinfo / CPPSUM.ZIP / CPPSUMV.TXT < prev    next >
Encoding:
Text File  |  1995-03-25  |  4.0 KB  |  84 lines

  1. '---------------------------------------------------------------------------
  2. ' Visual Basic interface definitions for CPPSUM.DLL
  3. ' DLL functions to get summary info from OLE 2.0 document files.
  4. '
  5. '     Copyright © 1994-1995 Somar Software, All Rights Reserved
  6. '     Send problem reports and comments to 72202.2574@compuserve.com
  7. '     Visit the Somar Software WWW site at http://www.somar.com
  8. '
  9. ' Example of usage:
  10. '    Dim wInitStatus as Integer, hSumInfo As Integer, bResult As Integer
  11. '    Dim s$, yr%, mon%, dy%, hr%, min%, sec%
  12. '    wInitStatus = SumInfoInit()
  13. '    If wInitStatus <> 0 Then
  14. '       hSumInfo = SumInfoOpenFile("..put your file name here..")
  15. '       If hSumInfo <> 0 Then
  16. '          s$ = String$(256, " ")
  17. '          bResult = SumInfoGetString(hSumInfo, PID_TITLE, s$, 256)
  18. '          bResult = SumInfoGetTime(hSumInfo, PID_LASTSAVED, yr%, mon%, dy%, hr%, min%, sec%)
  19. '          SumInfoCloseFile (hSumInfo)
  20. '       End If
  21. '       SumInfoUninit(wInitStatus)
  22. '    End If
  23. '
  24. ' Reasons for failure:
  25. '     SumInfoInit:     out of memory
  26. '     SumInfoOpenFile: out of memory
  27. '                      file not found
  28. '                      file is not an OLE 2.0 structured storage file
  29. '                      file does not contain OLE 2.0 summary info
  30. '                      OLE 2.0 summary info is incorrectly formatted
  31. '     SumInfoGet...  : specified property type is not available
  32. '     
  33. ' See CPPSUM.CPP for change log
  34. '---------------------------------------------------------------------------
  35.  
  36.    ' String properties 
  37. Global Const PID_TITLE          = &H02
  38. Global Const PID_SUBJECT        = &H03
  39. Global Const PID_AUTHOR         = &H04
  40. Global Const PID_KEYWORDS       = &H05
  41. Global Const PID_COMMENTS       = &H06
  42. Global Const PID_TEMPLATE       = &H07
  43. Global Const PID_LASTAUTHOR     = &H08
  44. Global Const PID_REVNUMBER      = &H09
  45. Global Const PID_APPNAME        = &H12
  46.  
  47.    ' Time properties
  48. Global Const PID_TOTAL_EDITTIME = &H0A
  49. Global Const PID_LASTPRINTED    = &H0B
  50. Global Const PID_CREATED        = &H0C
  51. Global Const PID_LASTSAVED      = &H0D
  52.  
  53.    ' Long integer properties
  54. Global Const PID_PAGECOUNT      = &H0E
  55. Global Const PID_WORDCOUNT      = &H0F
  56. Global Const PID_CHARCOUNT      = &H10
  57. Global Const PID_SECURITY       = &H13
  58.  
  59.    ' bit masks for security long integer
  60. Global Const AllSecurityFlagsEqNone         = &H00
  61. Global Const fSecurityPassworded            = &H01
  62. Global Const fSecurityRORecommended         = &H02
  63. Global Const fSecurityRO                    = &H04
  64. Global Const fSecurityLockedForAnnotations  = &H08
  65.  
  66.     ' 16 bit DLL
  67. Declare Function SumInfoInit Lib "CPPSUM.DLL" () As Integer
  68. Declare Function SumInfoOpenFile Lib "CPPSUM.DLL" (ByVal szPath As String) As Integer
  69. Declare Function SumInfoGetString Lib "CPPSUM.DLL" (ByVal hSumInfo As Integer, ByVal pid As Long, ByVal lpBuf As String, ByVal cbBuf As Integer) As Integer
  70. Declare Function SumInfoGetLong Lib "CPPSUM.DLL" (ByVal hSumInfo As Integer, ByVal pid As Long, lpLong As Long) As Integer
  71. Declare Function SumInfoGetTime Lib "CPPSUM.DLL" (ByVal hSumInfo As Integer, ByVal pid As Long, lpYr%, lpMon%, lpDay%, lpHr%, lpMin%, lpSec%) As Integer
  72. Declare Sub SumInfoCloseFile Lib "CPPSUM.DLL" (ByVal hSumInfo As Integer)
  73. Declare Sub SumInfoUninit Lib "CPPSUM.DLL" (ByVal wInitStatus as Integer)
  74.  
  75.     ' 32 bit DLL
  76. Declare Function SumInfoInit Lib "CPPSUM32.DLL" () As Integer
  77. Declare Function SumInfoOpenFile Lib "CPPSUM32.DLL" (ByVal szPath As String) As Long
  78. Declare Function SumInfoGetString Lib "CPPSUM32.DLL" (ByVal hSumInfo As Long, ByVal pid As Long, ByVal lpBuf As String, ByVal cbBuf As Integer) As Integer
  79. Declare Function SumInfoGetLong Lib "CPPSUM32.DLL" (ByVal hSumInfo As Long, ByVal pid As Long, lpLong As Long) As Integer
  80. Declare Function SumInfoGetTime Lib "CPPSUM32.DLL" (ByVal hSumInfo As Long, ByVal pid As Long, lpYr%, lpMon%, lpDay%, lpHr%, lpMin%, lpSec%) As Integer
  81. Declare Sub SumInfoCloseFile Lib "CPPSUM32.DLL" (ByVal hSumInfo As Long)
  82. Declare Sub SumInfoUninit Lib "CPPSUM32.DLL" (ByVal wInitStatus as Integer)
  83.  
  84.